package sn.hn.demo.unit;

import sn.hn.demo.GameActivity;
import sn.hn.demo.R;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class NumberText {
	public static Bitmap zero;
	public static Bitmap one;
	public static Bitmap two;
	public static Bitmap three;
	public static Bitmap four;
	public static Bitmap five;
	public static Bitmap six;
	public static Bitmap seven;
	public static Bitmap eight;
	public static Bitmap nine;
	public static Bitmap score;
	public static Bitmap clock;
	public static Bitmap level;
	public static Bitmap haicham;
	
	public NumberText() {
		getBitmap();
	}

	public void getBitmap() {
		zero = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n0);
		one = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n1);
		two = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n2);
		three = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n3);
		four = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n4);
		five = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n5);
		six = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n6);
		seven = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n7);
		eight = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n8);
		nine = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.n9);
		score = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.diem);
		clock = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.dongho);
		level = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.manchoi);
		haicham = BitmapFactory.decodeResource(GameActivity.mGameContext.getResources(), R.drawable.haicham);
	}

	public static Bitmap getBitmap(int i) {
		Bitmap temp = null;
		switch (i) {
		case 0:
			temp = zero;
			break;
		case 1:
			temp = one;
			break;
		case 2:
			temp = two;
			break;
		case 3:
			temp = three;
			break;
		case 4:
			temp = four;
			break;
		case 5:
			temp = five;
			break;
		case 6:
			temp = six;
			break;
		case 7:
			temp = seven;
			break;
		case 8:
			temp = eight;
			break;
		case 9:
			temp = nine;
			break;
		case 10:
			temp = haicham;
			break;
		default:
			temp = zero;
			break;
		}
		return temp;
	}
}
